﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Snom
{
    public delegate void SnomEventHandler(object sender, SnomEventArgs e);

    public class SnomEventArgs : EventArgs
    {
        /// <summary>
        /// $local --> the SIP URI of callee
        /// </summary>
        public string CalleeSipUri
        {
            get;
            set;
        }
            
        /// <summary>
        /// $remote --> the SIP URI of caller
        /// </summary>
        public string CallerSipUri
        {
            get;
            set;
        }

        /// <summary>
        /// $active_url --> the SIP URI of the active outgoing identity
        /// </summary>
        public string ActiveOutgoingIdentitySipUri
        {
            get;
            set;
        }

        /// <summary>
        /// $active_user --> the user part of the SIP URI for the active outgoing identity
        /// </summary>
        public string ActiveOutgoingIdentityUser
        {
            get;
            set;
        }

        /// <summary>
        /// $active_host --> the host part of the SIP URI for the active outgoing identity
        /// </summary>
        public string ActiveOutgoingIdentityHost
        {
            get;
            set;
        }

        /// <summary>
        /// $csta_id --> CSTA ID
        /// </summary>
        public string CstaId
        {
            get;
            set;
        }

        /// <summary>
        /// $call-id --> the call-id of the active call
        /// </summary>
        public string ActiveCallId
        {
            get;
            set;
        }

        /// <summary>
        /// $display_local --> used to display the name of callee
        /// </summary>
        public string CalleeDisplayName
        {
            get;
            set;
        }

        /// <summary>
        /// $display_remote --> used to display the name of caller.
        /// </summary>
        public string CallerDisplayName
        {
            get;
            set;
        }

        /// <summary>
        /// $expansion_module --> used to show which expansion module do you use and
        /// </summary>
        public string ExpansionModule
        {
            get;
            set;
        }

        /// <summary>
        ///  $active_key --> the function key (e.g. P1, P5, P32,..) associated with a call.
        /// </summary>
        public string ActiveCallFunctionKey
        {
            get;
            set;
        }

        public override string ToString()
        {
            return "CalleeSipUri = " + CalleeSipUri + Environment.NewLine +
                   "CallerSipUri = " + CallerSipUri + Environment.NewLine +
                   "ActiveOutgoingIdentitySipUri = " + ActiveOutgoingIdentitySipUri + Environment.NewLine +
                   "ActiveOutgoingIdentityUser = " + ActiveOutgoingIdentityUser + Environment.NewLine +
                   "ActiveOutgoingIdentityHost = " + ActiveOutgoingIdentityHost + Environment.NewLine +
                   "CstaId = " + CstaId + Environment.NewLine +
                   "ActiveCallId = " + ActiveCallId + Environment.NewLine +
                   "CalleeDisplayName = " + CalleeDisplayName + Environment.NewLine +
                   "CallerDisplayName = " + CallerDisplayName + Environment.NewLine +
                   "ExpansionModule = " + ExpansionModule + Environment.NewLine +
                   "ActiveCallFunctionKey = " + ActiveCallFunctionKey;
        }
    }
}
